#ifndef __INPUTCOMMAND_H
#define __INPUTCOMMAND_H


struct inputCommand
{
    char commandName[24]; // 命令名称
    char command[128];    // 命令
    char deviceName[128];    // 设备名称
    int  fd;// 文件操作符
    int (*Init)(struct inputCommand* command,char *name ,char *ipAddress, int port);
    int (*getCommand)(struct inputCommand* command,char *cmd);
    int (*sendCommand)(struct inputCommand* command,char *cmd);
    char log[1024];
    int sfd;
    char port[12];
    char ipAddress[32];

    struct inputCommand *Next;
};

struct inputCommand* addVoiceToInputCommandLink(struct inputCommand* phead);
struct inputCommand* addSocketToInputCommandLink(struct inputCommand* phead);


struct inputCommand* findInputCommandByName(char *name,struct inputCommand*phead);

#endif

